Import-Module posh-git
Import-Module Terminal-Icons
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\amro.omp.json" | Invoke-Expression

function CD_HOME_F {cd ~}
function CD1_F {cd ..}
function CD2_F {cd ../..}
function CD3_F {cd ../../..}

Set-Alias -Force -Option ReadOnly,AllScope -Name "~" -value "CD_HOME_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name ".." -value "CD1_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "..." -value "CD2_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "...." -value "CD3_F"

function PATH_F {$env:Path.Split(";")}
Set-Alias -Force -Option ReadOnly,AllScope -Name "path" -value "PATH_F"

function GA_F {git add $args}
function GB_F {git branch -v}
function GBA_F {git branch -a -v}
function GBD_F {git branch -d $args}
function GCLONE_F {git clone $args}
function GCLEAN_F {git clean -d -f}
function GCA_F {git commit --amend}
function GCM_F {git commit -m $args}
function GCK_F {git checkout $args}
function GCP_F {git cherry-pick $args}
function GD_F {git d $args}
function GDESCRIBE_F {git describe --tags}
function GDM_F {git dm $args}
function GFC_F {git fc $args}
function GFM_F {git fm $args}
function GL_F {git l}
function GLT_F {git tag -l}
function GM_F {git merge $args}
function GO_F {git go $args}
function GPATCH_F {git format-patch -M $args}
function GPL_F {git pull --rebase}
function GPLO_F {git pull origin master}
function GPS_F {git push}
function GPO_F {git push -u origin}
function GPF_F {git push origin --force}
function GRA_F {git rebase --abort}
function GRC_F {git rebase --continue}
function GRI_F {git rebase -i}
function GRAO_F {git remote add origin $args}
function GRSO_F {git remote show origin}
function GRMOB_F {git push origin --delete $args}
function GRMOT_F {git push origin --delete tag}
function GS_F {git status}
function GSH_F {git stash}
function GSHP_F {git stash pop}
function GSUB-INIT_F {git submodule update --init --recursive}
function GUB_F {git remote update origin -p}
function GWHO_F {git whoami}

Set-Alias -Force -Option ReadOnly,AllScope -Name "ga" -value "GA_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gb" -value "GB_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gba" -value "GBA_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gbd" -value "GBD_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gclone" -value "GCLONE_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gclean" -value "GCLEAN_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gca" -value "GCA_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gcm" -value "GCM_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gck" -value "GCK_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gcp" -value "GCP_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gd" -value "GD_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gdescribe" -value "GDESCRIBE_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gdm" -value "GDM_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gfc" -value "GFC_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gfm" -value "GFM_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gl" -value "GL_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "glt" -value "GLT_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gm" -value "GM_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "go" -value "GO_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gpatch" -value "GPATCH_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gpl" -value "GPL_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gplo" -value "GPLO_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gps" -value "GPS_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gpo" -value "GPO_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gpf" -value "GPF_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gra" -value "GRA_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "grc" -value "GRC_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gri" -value "GRI_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "grao" -value "GRAO_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "grso" -value "GRSO_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "grmob" -value "GRMOB_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "grmot" -value "GRMOT_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gs" -value "GS_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gsh" -value "GSH_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gshp" -value "GSHP_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gsub-init" -value "GSUB-INIT_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gub" -value "GUB_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "gwho" -value "GWHO_F"

function PRE-COMMIT-INSTALL_F {pre-commit install -c C:\Users\12236\.pre-commit-config.yaml; gitlint -C C:\Users\12236\.gitlint install-hook}
function PRE-COMMIT-UNINSTALL_F {pre-commit uninstall -c C:\Users\12236\.pre-commit-config.yaml; gitlint -C C:\Users\12236\.gitlint uninstall-hook}
function PRE-COMMIT-UPDATE_F {pre-commit autoupdate -c C:\Users\12236\.pre-commit-config.yaml --bleeding-edge}
function PRE-COMMIT-CLEAN_F {Remove-Item C:\Users\12236\.cache\pre-commit -Recurse -Force}

Set-Alias -Force -Option ReadOnly,AllScope -Name "pre-commit-install" -value "PRE-COMMIT-INSTALL_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "pre-commit-uninstall" -value "PRE-COMMIT-UNINSTALL_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "pre-commit-update" -value "PRE-COMMIT-UPDATE_F"
Set-Alias -Force -Option ReadOnly,AllScope -Name "pre-commit-clean" -value "PRE-COMMIT-CLEAN_F"
